//
//  Common.swift
//  Weibo
//
//  Created by 李亚乐 on 15/12/7.
//  Copyright © 2015年 李亚乐. All rights reserved.
//

import UIKit

 /// 全局外观颜色
let WBTintColor = UIColor.orangeColor()

/// 切换根控制器通知
let WBSwitchRootControllerNotification = "WBSwitchRootControllerNotification"
/// 点选微博图片通知
let WBNotificationStatusSelectedPhoto = "WBNotificationStatusSelectedPhoto"
///  userinfo 索引
let WBUserInfoKeyStatusSelectedPhotoIndex = "WBUserInfoKeyStatusSelectedPhotoIndex"
///  userinfo URL
let WBUserInfoKeyStatusSelectedPhotoURLs = "WBUserInfoKeyStatusSelectedPhotoURLs"

/// 延迟函数
///
/// - parameter delta:    延迟时间
/// - parameter callFunc: 执行函数
func delay(delta: Double, callFunc: ()->()) {
    
    dispatch_after(
        dispatch_time(DISPATCH_TIME_NOW, Int64(delta * Double(NSEC_PER_SEC))),
        dispatch_get_main_queue()) {
            
            callFunc()
    }
}
